
#ifndef MSGUTILS_BITSTREAM_ERROR_H
#define MSGUTILS_BITSTREAM_ERROR_H

namespace msgutils {

#define DEF(classname) \
class classname : public std::runtime_error { \
 public: \
  classname(void) \
      : std::runtime_error(#classname) {} \
};

DEF(insufficient_buffer_to_write)
DEF(index_out_of_range)
DEF(insufficient_buffer_to_drain)
DEF(insufficient_buffer_to_copy)
DEF(decode_number_failed)
DEF(insufficient_buffer_to_receive)

#undef DEF

} // namespace msgutils

#endif // MSGUTILS_BITSTREAM_ERROR_H

